package com.karrysong.blog_springboot.enums;

/**
 * @ClassName: ErrorCode
 * @Author: KarrySong
 * @Date: 2022/8/4 13:59
 * @Description:
 */
public enum  ErrorCode {

    /**
     *
     */
    PARAMS_ERROR(10001,"参数有误"),
    ACCOUNT_PWD_NOT_EXIST(10002,"用户名或密码不存在"),
    NO_PERMISSION(70001,"无访问权限"),
    SESSION_TIME_OUT(90001,"会话超时"),
    NO_LOGIN(90002,"未登录"),
    ACCOUNT_EXIST(10004,"账号（包括昵称、邮箱、电话）已存在或内容不符合规则"),
    ACCOUNT_CLOSE(10003, "账号被封禁"),
    ADMIN_ERROR(-200, "管理信息错误"),
    EMAIL_ERROR(-300, "邮件发送失败"),
    EMAIL_CODE_ERROR(-301, "邮件验证码错误"),
    EMAIL_INFO_ERROR(-302, "邮件信息错误（邮件地址不符或超时）"),
    EMAIL_SEND_FREQUENTLY(-303, "邮件发送频繁，请等待不超过15分钟"),
    OTHER_ERROR(-8888, "其他错误"),
    SYSTEM_EXCEPTION(-999, "系统异常"),
    SYSTEM_RECORD_ERROR(-300, "系统日志错误");

    private int code;
    private String msg;

    ErrorCode(int code, String msg){
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
